namespace MFWebSocket.Contract
{

    #region Interfaces

    /// <summary>
    /// Represents the interface a PusherClient must adhere to.
    /// </summary>
    public interface IPusherClient : IWebSocketClient
    {
        /// <summary>
        /// Sends a message on the underlying PusherClient
        /// </summary>
        /// <param name="message">The message to to be sent</param>
        void Send(PusherMessageArgs message);

        /// <summary>
        /// Indicates if this pusher client has been subscribed to a channel
        /// </summary>
        bool Subscribed { get; }

        /// <summary>
        /// The socket_id pusher has assigned to this client
        /// </summary>
        string SocketId { get; }
    }

    #endregion

    #region EventArgs

    public class PusherMessageArgs : MessageArgs
    {
        /// <summary>
        /// Constructs a PusherMessageArgs
        /// </summary>
        /// <param name="message"></param>
        public PusherMessageArgs(string message) : base(message) { }

        /// <summary>
        /// The event type of the message recieved from Pusher
        /// </summary>
        public string EventType { get; set; }
        /// <summary>
        /// THe data recieved in the message from Pusher
        /// </summary>
        public byte[] Data { get; set; }
    }

    #endregion     

}